package com.df.bpm.utils.businessViewer.entityDialogServices;

import com.df.bpm.dto.BusinessEntityDTO;
import com.df.bpm.utils.businessViewer.Main;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;

import java.util.List;

public class EntityDTOservice {

    public List<BusinessEntityDTO> getList4Like(BusinessEntityDTO temp) {
        RestTemplate restTemplate = new RestTemplate();
        String tempString=Main.printNonNullFields(temp);
        String url=Main.server+"businessEntity/dto4Like?"+tempString;
        ResponseEntity<List<BusinessEntityDTO>> response = restTemplate.exchange(
                url,
                HttpMethod.GET,
                null, // 或者使用 HttpEntity 来添加请求头等信息
                new ParameterizedTypeReference<List<BusinessEntityDTO>>() {}
        );
        return response.getBody();
    }



}
